const http = require('http');

const server = http.createServer((request,response) => {
    //定义一个变量
    let body = '';
   //获得请求体
   request.on('data',chunk => {
       body += chunk;
   });
   request.on('end',() => {
       console.log(body);
   });
   response.end('hello server');
});

server.listen(9000,() => {
    console.log('服务已开启 9000端口开始监听....');
});